import React, { Component } from 'react'
import {TopbarStyled} from "../styled/all"
export default class topbar extends Component {
    constructor(props){
        super(props)
        this.state={
            lilist:this.props.children
        }
    }
    
        lilist = ()=>{
            return this.state.lilist.map((item,index)=>{
                return (<li key={index}>{item}</li>)
        })
    }
    render() {
        return (
            <TopbarStyled>
            <ul className="topbar">
                {this.state.lilist?this.lilist():""}
            </ul>
            </TopbarStyled>
        )
    }
}
